DATA SEGMENT
    LED DB 06H, 5BH, 4FH, 66H, 6DH, 7DH, 07H, 7FH
DATA ENDS
CODE SEGMENT
    ASSUME CS:CODE, DS:DATA
START:
    MOV AX, DATA
    MOV DS, AX
    MOV DX, 201H
    IN AL, DX
    AND AL, 11111101B
    OUT DX, AL
    STI
    MOV DX, 223H
    MOV AL, 89H
    OUT DX, AL
    MOV AL, 03FH
    MOV DX, 220H
    OUT DX, AL
    MOV BX, OFFSET LED
SSS:
    MOV DX, 222H
    IN AL, DX
    OR AL, AL
    JE SSS
    MOV CL, 0FFH
RR:
    SHR AL, 1
    INC CL
    JNC RR
    MOV AL, CL
    XLAT
    MOV DX, 220H
    OUT DX, AL
WAI:
    MOV AH, 1
    INT 21H
    CMP AL, 20H
    JNE EEE
    MOV AL, 03FH
    MOV DX, 220H
    OUT DX, AL
    JMP SSS
EEE:
    MOV AH, 4CH
    INT 21H
CODE ENDS
    END START